package com.aduitlog.demo.service;

import com.adan.auditlog.annotation.MyBatisAuditLog;
import com.aduitlog.demo.entity.SysUser;
import com.aduitlog.demo.mapper.SysUserMapper;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@AllArgsConstructor
public class SysUserService {
    
    private SysUserMapper sysUserMapper;

    @MyBatisAuditLog(value = "更新用户",remarkField = "#sysUser.name")
    public int updateUser(SysUser sysUser) {
        return sysUserMapper.updateById(sysUser);
    }
}
